3.449 \(\int \frac{(a+a \sin (e+f x))^3}{(c+d \sin (e+f x))^2} \, dx\)

Optimal. Leaf size=161 \[ \frac{2 a^3 (c-d)^2 (2 c+3 d) \tan ^{-1}\left (\frac{c \tan \left (\frac{1}{2} (e+f x)\right )+d}{\sqrt{c^2-d^2}}\right )}{d^3 f (c+d) \sqrt{c^2-d^2}}-\frac{2 a^3 c \cos (e+f x)}{d^2 f (c+d)}-\frac{a^3 x (2 c-3 d)}{d^3}+\frac{(c-d) \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right )}{d f (c+d) (c+d \sin (e+f x))} \]

[Out]

-((a^3*(2*c - 3*d)*x)/d^3) + (2*a^3*(c - d)^2*(2*c + 3*d)*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]])/(d
^3*(c + d)*Sqrt[c^2 - d^2]*f) - (2*a^3*c*Cos[e + f*x])/(d^2*(c + d)*f) + ((c - d)*Cos[e + f*x]*(a^3 + a^3*Sin[
e + f*x]))/(d*(c + d)*f*(c + d*Sin[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.38052, antiderivative size = 161, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.28, Rules used = {2762, 2968, 3023, 2735, 2660, 618, 204} \[ \frac{2 a^3 (c-d)^2 (2 c+3 d) \tan ^{-1}\left (\frac{c \tan \left (\frac{1}{2} (e+f x)\right )+d}{\sqrt{c^2-d^2}}\right )}{d^3 f (c+d) \sqrt{c^2-d^2}}-\frac{2 a^3 c \cos (e+f x)}{d^2 f (c+d)}-\frac{a^3 x (2 c-3 d)}{d^3}+\frac{(c-d) \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right )}{d f (c+d) (c+d \sin (e+f x))} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^3/(c + d*Sin[e + f*x])^2,x]

[Out]

-((a^3*(2*c - 3*d)*x)/d^3) + (2*a^3*(c - d)^2*(2*c + 3*d)*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]])/(d
^3*(c + d)*Sqrt[c^2 - d^2]*f) - (2*a^3*c*Cos[e + f*x])/(d^2*(c + d)*f) + ((c - d)*Cos[e + f*x]*(a^3 + a^3*Sin[
e + f*x]))/(d*(c + d)*f*(c + d*Sin[e + f*x]))

Rule 2762

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Si
mp[(b^2*(b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^(n + 1))/(d*f*(n + 1)*(b*c
+ a*d)), x] + Dist[b^2/(d*(n + 1)*(b*c + a*d)), Int[(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^(n + 1)*
Simp[a*c*(m - 2) - b*d*(m - 2*n - 4) - (b*c*(m - 1) - a*d*(m + 2*n + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a,
 b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1] && LtQ[n, -1]
&& (IntegersQ[2*m, 2*n] || IntegerQ[m + 1/2] || (IntegerQ[m] && EqQ[c, 0]))

Rule 2968

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x
]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]

Rule 3023

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[1/(b*
(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(a+a \sin (e+f x))^3}{(c+d \sin (e+f x))^2} \, dx &=\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{d (c+d) f (c+d \sin (e+f x))}-\frac{a \int \frac{(a+a \sin (e+f x)) (a (c-3 d)-2 a c \sin (e+f x))}{c+d \sin (e+f x)} \, dx}{d (c+d)}\\ &=\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{d (c+d) f (c+d \sin (e+f x))}-\frac{a \int \frac{a^2 (c-3 d)+\left (-2 a^2 c+a^2 (c-3 d)\right ) \sin (e+f x)-2 a^2 c \sin ^2(e+f x)}{c+d \sin (e+f x)} \, dx}{d (c+d)}\\ &=-\frac{2 a^3 c \cos (e+f x)}{d^2 (c+d) f}+\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{d (c+d) f (c+d \sin (e+f x))}-\frac{a \int \frac{a^2 (c-3 d) d+a^2 (2 c-3 d) (c+d) \sin (e+f x)}{c+d \sin (e+f x)} \, dx}{d^2 (c+d)}\\ &=-\frac{a^3 (2 c-3 d) x}{d^3}-\frac{2 a^3 c \cos (e+f x)}{d^2 (c+d) f}+\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{d (c+d) f (c+d \sin (e+f x))}+\frac{\left (a^3 (c-d)^2 (2 c+3 d)\right ) \int \frac{1}{c+d \sin (e+f x)} \, dx}{d^3 (c+d)}\\ &=-\frac{a^3 (2 c-3 d) x}{d^3}-\frac{2 a^3 c \cos (e+f x)}{d^2 (c+d) f}+\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{d (c+d) f (c+d \sin (e+f x))}+\frac{\left (2 a^3 (c-d)^2 (2 c+3 d)\right ) \operatorname{Subst}\left (\int \frac{1}{c+2 d x+c x^2} \, dx,x,\tan \left (\frac{1}{2} (e+f x)\right )\right )}{d^3 (c+d) f}\\ &=-\frac{a^3 (2 c-3 d) x}{d^3}-\frac{2 a^3 c \cos (e+f x)}{d^2 (c+d) f}+\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{d (c+d) f (c+d \sin (e+f x))}-\frac{\left (4 a^3 (c-d)^2 (2 c+3 d)\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (c^2-d^2\right )-x^2} \, dx,x,2 d+2 c \tan \left (\frac{1}{2} (e+f x)\right )\right )}{d^3 (c+d) f}\\ &=-\frac{a^3 (2 c-3 d) x}{d^3}+\frac{2 a^3 (c-d)^2 (2 c+3 d) \tan ^{-1}\left (\frac{d+c \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c^2-d^2}}\right )}{d^3 (c+d) \sqrt{c^2-d^2} f}-\frac{2 a^3 c \cos (e+f x)}{d^2 (c+d) f}+\frac{(c-d) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{d (c+d) f (c+d \sin (e+f x))}\\ \end{align*}

Mathematica [A]  time = 0.678351, size = 162, normalized size = 1.01 \[ \frac{a^3 (\sin (e+f x)+1)^3 \left (\frac{2 (2 c+3 d) (c-d)^2 \tan ^{-1}\left (\frac{c \tan \left (\frac{1}{2} (e+f x)\right )+d}{\sqrt{c^2-d^2}}\right )}{(c+d) \sqrt{c^2-d^2}}+(3 d-2 c) (e+f x)-\frac{d (c-d)^2 \cos (e+f x)}{(c+d) (c+d \sin (e+f x))}-d \cos (e+f x)\right )}{d^3 f \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^6} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^3/(c + d*Sin[e + f*x])^2,x]

[Out]

(a^3*(1 + Sin[e + f*x])^3*((-2*c + 3*d)*(e + f*x) + (2*(c - d)^2*(2*c + 3*d)*ArcTan[(d + c*Tan[(e + f*x)/2])/S
qrt[c^2 - d^2]])/((c + d)*Sqrt[c^2 - d^2]) - d*Cos[e + f*x] - ((c - d)^2*d*Cos[e + f*x])/((c + d)*(c + d*Sin[e
 + f*x]))))/(d^3*f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^6)

________________________________________________________________________________________

Maple [B]  time = 0.131, size = 600, normalized size = 3.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^3/(c+d*sin(f*x+e))^2,x)

[Out]

-2/f*a^3/d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)/(c+d)*c*tan(1/2*f*x+1/2*e)+4/f*a^3/(c*tan(1/2*f*x
+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)/(c+d)*tan(1/2*f*x+1/2*e)-2/f*a^3*d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1
/2*e)*d+c)/(c+d)/c*tan(1/2*f*x+1/2*e)-2/f*a^3/d^2/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)/(c+d)*c^2+
4/f*a^3/d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)/(c+d)*c-2/f*a^3/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*
f*x+1/2*e)*d+c)/(c+d)+4/f*a^3/d^3/(c+d)/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2
))*c^3-2/f*a^3/d^2/(c+d)/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))*c^2-8/f*a^3/
d/(c+d)/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))*c+6/f*a^3/(c+d)/(c^2-d^2)^(1/
2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))-2/f*a^3/d^2/(1+tan(1/2*f*x+1/2*e)^2)-4/f*a^3/d^3*a
rctan(tan(1/2*f*x+1/2*e))*c+6/f*a^3/d^2*arctan(tan(1/2*f*x+1/2*e))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3/(c+d*sin(f*x+e))^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.00415, size = 1389, normalized size = 8.63 \begin{align*} \left [-\frac{2 \,{\left (2 \, a^{3} c^{3} - a^{3} c^{2} d - 3 \, a^{3} c d^{2}\right )} f x +{\left (2 \, a^{3} c^{3} + a^{3} c^{2} d - 3 \, a^{3} c d^{2} +{\left (2 \, a^{3} c^{2} d + a^{3} c d^{2} - 3 \, a^{3} d^{3}\right )} \sin \left (f x + e\right )\right )} \sqrt{-\frac{c - d}{c + d}} \log \left (\frac{{\left (2 \, c^{2} - d^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, c d \sin \left (f x + e\right ) - c^{2} - d^{2} + 2 \,{\left ({\left (c^{2} + c d\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) +{\left (c d + d^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt{-\frac{c - d}{c + d}}}{d^{2} \cos \left (f x + e\right )^{2} - 2 \, c d \sin \left (f x + e\right ) - c^{2} - d^{2}}\right ) + 2 \,{\left (2 \, a^{3} c^{2} d - a^{3} c d^{2} + a^{3} d^{3}\right )} \cos \left (f x + e\right ) + 2 \,{\left ({\left (2 \, a^{3} c^{2} d - a^{3} c d^{2} - 3 \, a^{3} d^{3}\right )} f x +{\left (a^{3} c d^{2} + a^{3} d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \,{\left ({\left (c d^{4} + d^{5}\right )} f \sin \left (f x + e\right ) +{\left (c^{2} d^{3} + c d^{4}\right )} f\right )}}, -\frac{{\left (2 \, a^{3} c^{3} - a^{3} c^{2} d - 3 \, a^{3} c d^{2}\right )} f x +{\left (2 \, a^{3} c^{3} + a^{3} c^{2} d - 3 \, a^{3} c d^{2} +{\left (2 \, a^{3} c^{2} d + a^{3} c d^{2} - 3 \, a^{3} d^{3}\right )} \sin \left (f x + e\right )\right )} \sqrt{\frac{c - d}{c + d}} \arctan \left (-\frac{{\left (c \sin \left (f x + e\right ) + d\right )} \sqrt{\frac{c - d}{c + d}}}{{\left (c - d\right )} \cos \left (f x + e\right )}\right ) +{\left (2 \, a^{3} c^{2} d - a^{3} c d^{2} + a^{3} d^{3}\right )} \cos \left (f x + e\right ) +{\left ({\left (2 \, a^{3} c^{2} d - a^{3} c d^{2} - 3 \, a^{3} d^{3}\right )} f x +{\left (a^{3} c d^{2} + a^{3} d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{{\left (c d^{4} + d^{5}\right )} f \sin \left (f x + e\right ) +{\left (c^{2} d^{3} + c d^{4}\right )} f}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3/(c+d*sin(f*x+e))^2,x, algorithm="fricas")

[Out]

[-1/2*(2*(2*a^3*c^3 - a^3*c^2*d - 3*a^3*c*d^2)*f*x + (2*a^3*c^3 + a^3*c^2*d - 3*a^3*c*d^2 + (2*a^3*c^2*d + a^3
*c*d^2 - 3*a^3*d^3)*sin(f*x + e))*sqrt(-(c - d)/(c + d))*log(((2*c^2 - d^2)*cos(f*x + e)^2 - 2*c*d*sin(f*x + e
) - c^2 - d^2 + 2*((c^2 + c*d)*cos(f*x + e)*sin(f*x + e) + (c*d + d^2)*cos(f*x + e))*sqrt(-(c - d)/(c + d)))/(
d^2*cos(f*x + e)^2 - 2*c*d*sin(f*x + e) - c^2 - d^2)) + 2*(2*a^3*c^2*d - a^3*c*d^2 + a^3*d^3)*cos(f*x + e) + 2
*((2*a^3*c^2*d - a^3*c*d^2 - 3*a^3*d^3)*f*x + (a^3*c*d^2 + a^3*d^3)*cos(f*x + e))*sin(f*x + e))/((c*d^4 + d^5)
*f*sin(f*x + e) + (c^2*d^3 + c*d^4)*f), -((2*a^3*c^3 - a^3*c^2*d - 3*a^3*c*d^2)*f*x + (2*a^3*c^3 + a^3*c^2*d -
 3*a^3*c*d^2 + (2*a^3*c^2*d + a^3*c*d^2 - 3*a^3*d^3)*sin(f*x + e))*sqrt((c - d)/(c + d))*arctan(-(c*sin(f*x +
e) + d)*sqrt((c - d)/(c + d))/((c - d)*cos(f*x + e))) + (2*a^3*c^2*d - a^3*c*d^2 + a^3*d^3)*cos(f*x + e) + ((2
*a^3*c^2*d - a^3*c*d^2 - 3*a^3*d^3)*f*x + (a^3*c*d^2 + a^3*d^3)*cos(f*x + e))*sin(f*x + e))/((c*d^4 + d^5)*f*s
in(f*x + e) + (c^2*d^3 + c*d^4)*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**3/(c+d*sin(f*x+e))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.40815, size = 533, normalized size = 3.31 \begin{align*} \frac{\frac{2 \,{\left (2 \, a^{3} c^{3} - a^{3} c^{2} d - 4 \, a^{3} c d^{2} + 3 \, a^{3} d^{3}\right )}{\left (\pi \left \lfloor \frac{f x + e}{2 \, \pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (c\right ) + \arctan \left (\frac{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + d}{\sqrt{c^{2} - d^{2}}}\right )\right )}}{{\left (c d^{3} + d^{4}\right )} \sqrt{c^{2} - d^{2}}} - \frac{2 \,{\left (a^{3} c^{2} d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 2 \, a^{3} c d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + a^{3} d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 2 \, a^{3} c^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - a^{3} c^{2} d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + a^{3} c d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 3 \, a^{3} c^{2} d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + a^{3} d^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 2 \, a^{3} c^{3} - a^{3} c^{2} d + a^{3} c d^{2}\right )}}{{\left (c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} + 2 \, d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 2 \, c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 2 \, d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + c\right )}{\left (c^{2} d^{2} + c d^{3}\right )}} - \frac{{\left (2 \, a^{3} c - 3 \, a^{3} d\right )}{\left (f x + e\right )}}{d^{3}}}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3/(c+d*sin(f*x+e))^2,x, algorithm="giac")

[Out]

(2*(2*a^3*c^3 - a^3*c^2*d - 4*a^3*c*d^2 + 3*a^3*d^3)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(c) + arctan((c*tan(
1/2*f*x + 1/2*e) + d)/sqrt(c^2 - d^2)))/((c*d^3 + d^4)*sqrt(c^2 - d^2)) - 2*(a^3*c^2*d*tan(1/2*f*x + 1/2*e)^3
- 2*a^3*c*d^2*tan(1/2*f*x + 1/2*e)^3 + a^3*d^3*tan(1/2*f*x + 1/2*e)^3 + 2*a^3*c^3*tan(1/2*f*x + 1/2*e)^2 - a^3
*c^2*d*tan(1/2*f*x + 1/2*e)^2 + a^3*c*d^2*tan(1/2*f*x + 1/2*e)^2 + 3*a^3*c^2*d*tan(1/2*f*x + 1/2*e) + a^3*d^3*
tan(1/2*f*x + 1/2*e) + 2*a^3*c^3 - a^3*c^2*d + a^3*c*d^2)/((c*tan(1/2*f*x + 1/2*e)^4 + 2*d*tan(1/2*f*x + 1/2*e
)^3 + 2*c*tan(1/2*f*x + 1/2*e)^2 + 2*d*tan(1/2*f*x + 1/2*e) + c)*(c^2*d^2 + c*d^3)) - (2*a^3*c - 3*a^3*d)*(f*x
 + e)/d^3)/f